//ConnectionHander.h
 
#ifndef CONNECTIONHANDER_H_
#define CONNECTIONHANDER_H_

#include "SocketLibTypes.h"
#include "Connection.h"

namespace SocketLib{

template<class protocol, class command>
class ConnectionHandler{

public:

	typedef Connection<protocol> conn;
	ConnectionHandler(conn& p_conn) : m_connection(&p_conn) {}
	virtual ~ConnectionHandler(){}
	virtual void Handle(command p_data) = 0;
	virtual void Enter() = 0;
	virtual void Leave() = 0;
	virtual void Hungup() = 0;
	virtual void Flooded() = 0;

protected:
	conn* m_connection;


};

} //end of namespace SocketLib

#endif